package com.liuyou.weather4;

public class BaiduWebsite implements WebsiteObserver {
    WeatherData weatherData;

    public BaiduWebsite() {
        weatherData = new WeatherData();
    }

    @Override
    public void update(WeatherData weatherData) {
        this.weatherData.temperature = weatherData.temperature;
        this.weatherData.pressure = weatherData.pressure;
        this.weatherData.humidity = weatherData.humidity;
    }

    @Override
    public String toString() {
        return "BaiduWebsite{" +
                "weatherData=" + weatherData +
                '}';
    }
}
